import { getAll } from '../../http/orders.js'
export default ({
	namespaced:true,
	state:{
		AllLists:[]
	},
	mutations:{
		renderAllId(state,data){
			// const ee=state.AllLists.concat(data);
			// ,data.fundList,data.goldList,data.regularList
			// state.AllLists=ee;
			const ee=state.AllLists.concat(data.currentList,data.fundList,data.goldList,data.regularList)
			// console.log(ee)
			state.AllLists=ee;
		}
		// ,data.fundList,data.goldList,data.regularList
	},
	actions:{
	async getAllorder(context,data){
			const result=await getAll(data);
			
			console.log(result.data,'123123');
			if(result.code){
				// context.commit("renderAllId",result.data.currentList);
				// context.commit("renderAllId",result.data.fundList);
				// context.commit("renderAllId",result.data.goldList);
				// context.commit("renderAllId",result.data.regularList);
				// console.log(result.data.currentList)
				
				 context.commit("renderAllId",result.data);
			}
			
		}
	}
})